﻿using OutSourceingServices.Helper;
using System;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace OutSourceingServices.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";

            return View();
        }

        [HttpPost]
        public ActionResult ChangeLanguage(string id, string actionName, string controllerName)
        {
            SessionHelper.Culture = new CultureInfo(id);
            
            return RedirectToAction(actionName, controllerName);
        }


        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
